<!--{include(pe_tpl('header.html'));}-->
<div class="huiyuan_content">
	<!--{include(pe_tpl('user_menu.html'));}-->
	<div class="fr huiyuan_main">
		<div class="hy_tt">
			<a href="{$pe['host_root']}user.php?mod=pay" <!--{if($menumark=='pay'):}-->class="sel"<!--{endif;}-->>账户充值</a>
			<a href="{$pe['host_root']}user.php?mod=cashout&act=add" <!--{if($menumark=='cashout_add'):}-->class="sel"<!--{endif;}-->>申请提现</a>
			<a href="{$pe['host_root']}user.php?mod=cashout" <!--{if($menumark=='cashout_list'):}-->class="sel"<!--{endif;}-->>提现记录</a>
		</div>
		<div class="hy_table">
		<form method="post" id="form">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td style="text-align:right;" width="150">账户余额：</td>
			<td><span class="corg">{$info['user_money']} 元</span></td>
		</tr>
		<tr>
			<td style="text-align:right;">收款账户：</td>
			<td>
				<select name="userbank_id" class="inputselect">
				<option value="">请选择</option>
				<!--{foreach($userbank_list as $k=>$v):}-->
				<!--<option value="{$v['userbank_id']}">{$v['userbank_name']}({substr($v['userbank_num'], 0, 4)}**** ****{substr($v['userbank_num'], -4)})</option>-->
				<option value="{$v['userbank_id']}" userbank_tname="{$v['userbank_tname']}">{$v['userbank_name']}[{$v['userbank_num']}] - {$v['userbank_tname']}</option>
				<!--{endforeach;}-->
				</select>
				<span id="userbank_id_show"></span>
			</td>
		</tr>
		<tr>
			<td style="text-align:right;">提现金额：</td>
			<td>
				<input type="text" name="cashout_money" class="inputall input100" autocomplete="off" /> 元
				<span id="cashout_money_show" class="mal10"></span>
			</td>
		</tr>
		<tr>
			<td style="text-align:right;">扣手续费：</td>
			<td><span id="cashout_fee">0</span> 元</td>
		</tr>
		<tr>
			<td></td>
			<td>
				<input type="hidden" name="pe_token" value="{$pe_token}" />
				<input type="hidden" name="pesubmit" />	
				<input type="button" value="提 交"  class="tjbtn" />
			</td>
		</tr>
		</table>
		</form>
		<div class="tixing c888" style="margin-top:70px"><p class="cred mab10">温馨提示：</p>单笔{$cache_setting['cashout_min']}元起可以提现，每笔扣除{$cache_setting['cashout_fee']*100}%的手续费</div>
		</div>
	</div>
	<div class="clear"></div>
</div>
<script type="text/javascript" src="{$pe['host_root']}include/js/formcheck.js"></script>
<script type="text/javascript">
if ({count($userbank_list)} == 0) {
	pe_alert('请先添加收款账户', function(){
		pe_open('user.php?mod=userbank&act=add&fromto=cashout');
	});
}
$(function(){
	$(":input[name='cashout_money']").bind('keyup blur', function(){
		var cashout_money = pe_num($(this).val(), 'round', 1);
		var cashout_fee = pe_num(cashout_money * {$cache_setting['cashout_fee']}, 'round', 1);
		$("#cashout_fee").html(cashout_fee);
	})
	var form_info = [
		{"name":"userbank_id", "mod":"str", "act":"change", "arg":"", "show_id":"userbank_id_show","show_error":"请选择", "must":true},
		{"name":"cashout_money", "mod":"num", "act":"blur", "arg":"{$cache_setting['cashout_min']}|", "show_id":"cashout_money_show","show_error":"提现金额小于{$cache_setting['cashout_min']}元", "must":true}
	]
	$(":button").pe_submit(form_info, 'form');
})
</script>
<!--{include(pe_tpl('footer.html'));}-->